home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1997 April / macformat-049.iso / mac / Shareware Plus / Applications / Edwins Power Tools / REG_CODE.TXT < prev   
Encoding:
Text File  |  1997-01-04  |  1.2 KB  |  51 lines  |  [TEXT/MSOB]

  1. Option Explicit
  2. Sub print_reg_form()
  3. If ActiveSheet.CheckBoxes("agree_check").Value = -4146 Then
  4. MsgBox ("Sorry, I cannot sell this shareware to you because you don't agree with the contract."), vbExclamation
  5. Else
  6. On Error GoTo p_er
  7. With ActiveSheet
  8. With .PageSetup
  9. .CenterHorizontally = True
  10. .Orientation = 1
  11. .Draft = False
  12. .BlackAndWhite = True
  13. .FitToPagesWide = 1
  14. .FitToPagesTall = 1
  15. End With
  16. .PrintOut
  17. End With
  18. Exit Sub
  19. p_er:
  20. MsgBox ("Error printing out registration form."), vbExclamation
  21. End If
  22. End Sub
  23. Sub formsheet_reset()
  24. Application.ScreenUpdating = False
  25. Dim reg_items, reg_S%
  26. reg_items = Array("NAME", "COMPANY", "EMAIL", "ADDRESS", "address2", "LICENSE1", "LICENSE2", "BONUS")
  27. With Worksheets(1)
  28. For reg_S = 0 To 7
  29. .Range(reg_items(reg_S)).ClearContents
  30. Next
  31. .Unprotect
  32. .Range("discount").Value = 0
  33. .Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
  34. .CheckBoxes("MACMAC").Value = -4146
  35. .CheckBoxes("agree_check").Value = -4146
  36. End With
  37. End Sub
  38. Sub macmacmac()
  39. With ActiveSheet
  40. .Unprotect
  41. With .Range("discount")
  42. If ActiveSheet.CheckBoxes("MACMAC").Value = 1 Then
  43. .Value = -10
  44. Else
  45. .Value = 0
  46. End If
  47. End With
  48. .Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
  49. End With
  50. End Sub
  51.